package phoenix.web.test_suites.wildbuddies.common.registration;

import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import phoenix.core.base.TestSuiteBase;
import phoenix.web.test_objects.RegistrationTests;

public class MainFormTS extends TestSuiteBase
{
	private final RegistrationTests registrationTests = new RegistrationTests(phoenix);

	@DataProvider
	public Object[][] validationDataBirth()
	{
		return registrationTests.dataProviders.validationDataBirth();
	}

	@DataProvider
	public Object[][] validationDataEmail()
	{
		return registrationTests.dataProviders.validationDataEmail();
	}

	@DataProvider
	public Object[][] validationDataPassword()
	{
		return registrationTests.dataProviders.validationDataPassword();
	}

	@DataProvider
	public Object[][] validationDataLocation()
	{
		return registrationTests.dataProviders.validationDataLocation();
	}

	@DataProvider
	public Object[][] resendEmail()
	{
		return registrationTests.dataProviders.resendEmail();
	}

	@Test(dataProvider = "validationDataBirth", priority = 1, enabled = true)
	public void mainFormBirthValidationTest(String p_day, String p_month, String p_year, boolean p_expected)
	{
		registrationTests.birthValidationTest(p_day, p_month, p_year, p_expected);
	}

	@Test(dataProvider = "validationDataEmail", priority = 2, enabled = true)
	public void mainFormEmailValidationTest(String p_email, boolean p_expected)
	{
		registrationTests.emailValidationTest(p_email, p_expected);
	}

	@Test(dataProvider = "resendEmail", priority = 3, enabled = true)
	public void mainFormResendEmailTest(String p_email, String p_expected)
	{
		registrationTests.resendEmailTest(p_email, p_expected);
	}

	@Test(dataProvider = "validationDataPassword", priority = 4, enabled = true)
	public void mainFormPasswordValidationTest(String p_password, boolean p_expected)
	{
		registrationTests.passwordValidationTest(p_password, p_expected);
	}

	@Test(dataProvider = "validationDataLocation", priority = 5, enabled = true)
	public void mainFormLocationValidationTest(String p_location, boolean p_expected)
	{
		registrationTests.locationValidationTest(p_location, p_expected);
	}

	@Test(priority = 6, enabled = true)
	public void mainFormTermsTest()
	{
		registrationTests.termsTest();
	}

	@Test(priority = 7, enabled = true)
	public void mainFormPrivacyTest()
	{
		registrationTests.privacyTest();
	}
}